import AbstractService from "./abstract.service";
import ApiConfig from "@/config/api.config";
import UserInfo from "@/entity/interface/user.interface";
import { ErrorRequest } from "./abstract.service";

export class UserService extends AbstractService {
  /**
   * 用户登录
   * @param data 登陆参数
   */
  login(data: any) {
    return super.PostData("api/admin/v1/login", data);
  }

  /**
   * 用户注册
   * @param data 注册参数
   */
  register(data: any) {
    return super.PostData(ApiConfig.User.register, data);
  }

  /**
   * 用户信息
   */
  userInfo() {
    return super.GetData(ApiConfig.User.userInfo, null);
  }
}
